How to efficiently generate combinatorial structures
such as posets, trees, B-trees, graphs, permutations, set partitions, Dyck paths, multisets or necklaces ... ?
The Ruskey's book gives answers.
It contains many surprising descriptions (and bibliographic references)
of constant amortized time (CAT) and loopless algorithms.
> **CAT Algorithms** The holy grail of generating combinatorial objects is to find an algorithm that runs in Constant Amortized Time. This means that the amount of computation, after a small amount of preprocessing, is proportional to the number of objects that are listed. We do not count the time to actually output or process the objects; we are only concerned with the amount of data structure change that occurs as the objects are being generated.
_ Ruskey's book, page 8 _
> ** Loopless algorithm ** is an imperative algorithm that generates successive combinatorial objects, such as partitions, permutations, and combinations, in constant time and the first object in linear time
_ https://en.wikipedia.org/wiki/Loopless_algorithm _
How to efficiently generate combinatorial structures
such as posets, trees, B-trees, graphs, permutations, set partitions, Dyck paths, multisets or necklaces ... ?
The Ruskey's book gives answers.
It contains many surprising descriptions (and bibliographic references)
of constant amortized time (CAT) and loopless algorithms.
> **CAT Algorithms** The holy grail of generating combinatorial objects is to find an algorithm that runs in Constant Amortized Time. This means that the amount of computation, after a small amount of preprocessing, is proportional to the number of objects that are listed. We do not count the time to actually output or process the objects; we are only concerned with the amount of data structure change that occurs as the objects are being generated.
_ Ruskey's book, page 8 _
> ** Loopless algorithm ** is an imperative algorithm that generates successive combinatorial objects, such as partitions, permutations, and combinations, in constant time and the first object in linear time
_ https://en.wikipedia.org/wiki/Loopless_algorithm _
Apparently, a single 'mov' assembler instruction is already Turing complete.
Implementation of mov-only compilator is [available](https://github.com/xoreaxeaxeax/movfuscator/blob/master/README.md).
> The M/o/Vfuscator (short 'o', sounds like "mobfuscator") compiles programs into "mov" instructions, and only "mov" instructions. Arithmetic, comparisons, jumps, function calls, and everything else a program needs are all performed through mov operations; there is no self-modifying code, no transport-triggered calculation, and no other form of non-mov cheating.
Apparently, a single 'mov' assembler instruction is already Turing complete.
Implementation of mov-only compilator is [available](https://github.com/xoreaxeaxeax/movfuscator/blob/master/README.md).
> The M/o/Vfuscator (short 'o', sounds like "mobfuscator") compiles programs into "mov" instructions, and only "mov" instructions. Arithmetic, comparisons, jumps, function calls, and everything else a program needs are all performed through mov operations; there is no self-modifying code, no transport-triggered calculation, and no other form of non-mov cheating.
Comments: